Telegram Group & Telegram Channel
Удаление префиксов и суффиксов

По какой-то неизведанной причине многие разработчики посчитали эту фичу в обновлении 3.9 не очень интересной и попросту забыли. И зря.

Некоторые на полном серьезе для таких целей до сих пор пытаются использовать забагованные .strip и .lsrtip. Точнее, большинство просто не до конца понимают, как работают эти два метода.

И всё же, в Python 3.9 были добавлены методы для строк .removeprefix и .removesuffix, предназначенные специально для удаления префиксов и суффиксов в строках.

#строки



tg-me.com/python_academy/350
Create:
Last Update:

Удаление префиксов и суффиксов

По какой-то неизведанной причине многие разработчики посчитали эту фичу в обновлении 3.9 не очень интересной и попросту забыли. И зря.

Некоторые на полном серьезе для таких целей до сих пор пытаются использовать забагованные .strip и .lsrtip. Точнее, большинство просто не до конца понимают, как работают эти два метода.

И всё же, в Python 3.9 были добавлены методы для строк .removeprefix и .removesuffix, предназначенные специально для удаления префиксов и суффиксов в строках.

#строки

BY Python Academy




Share with your friend now:
tg-me.com/python_academy/350

View MORE
Open in Telegram


Python Academy Telegram | DID YOU KNOW?

Date: |

The SSE was the first modern stock exchange to open in China, with trading commencing in 1990. It has now grown to become the largest stock exchange in Asia and the third-largest in the world by market capitalization, which stood at RMB 50.6 trillion (US$7.8 trillion) as of September 2021. Stocks (both A-shares and B-shares), bonds, funds, and derivatives are traded on the exchange. The SEE has two trading boards, the Main Board and the Science and Technology Innovation Board, the latter more commonly known as the STAR Market. The Main Board mainly hosts large, well-established Chinese companies and lists both A-shares and B-shares.

At a time when the Indian stock market is peaking and has rallied immensely compared to global markets, there are companies that have not performed in the last 10 years. These are definitely a minor portion of the market considering there are hundreds of stocks that have turned multibagger since 2020. What went wrong with these stocks? Reasons vary from corporate governance, sectoral weakness, company specific and so on. But the more important question is, are these stocks worth buying?

Python Academy from fr


Telegram Python Academy
FROM USA